<?php

namespace App\Models\Member;

use App\Models\BaseModel;

class TotalBonusPool extends BaseModel
{
    protected $fillable = [
        'id', 'store_id', 'bonus_pool_one_sum',
        'team_month_sum', 'team_year_sum',
        'team_recommend_sum', 'team_fund_sum',
        'bd_referrer_sum', 'bd_provident_fund_sum',
        'bd_member_pool_sum', 'bd_order_pool_sum',
        'created_at', 'updated_at'
    ];

    public function getKeyText($key)
    {
        $str = [];
        switch ($key) {
            case 'bonus_pool_one_sum':
                $str['reason']= '会员折扣';
                $str['type']= 1;
                $str['deal_type']= 21;
                break;
            case 'team_month_sum':
                $str['reason']= '团购折让';
                $str['type']= 2;
                $str['deal_type']= 22;
                break;
            case 'team_year_sum':
                $str['reason']= '富利惠';
                $str['type']= 3;
                $str['deal_type']= 23;
                break;
            case 'team_recommend_sum':
                $str['reason']= '百乐惠';
                $str['type']= 4;
                $str['deal_type']= 24;
                break;
            case 'team_fund_sum':
                $str['reason']= '教育培训基金';
                $str['type']= 5;
                $str['deal_type']= 25;
                break;
            case 'bd_referrer_sum':
                $str['reason']= '码上返';
                $str['type']= 6;
                $str['deal_type']= 46;
                break;
            case 'bd_provident_fund_sum':
                $str['reason']= '报单公积';
                $str['type']= 7;
                $str['deal_type']= 49;
                break;   
            case 'bd_member_pool_sum':
                $str['reason']= '虹包';
                $str['type']= 8;
                $str['deal_type']= 56;
                break;   
            case 'bd_order_pool_sum':
                $str['reason']= '分虹';
                $str['type']= 9;
                $str['deal_type']= 59;
                break;                 
            default:
                # code...
                break;
        }
        return $str;
    }
}
